﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace XiaoYuJi.Entity.SysEntitys;

/// <summary>
/// 用户表
/// </summary>
[Table("Sys_User")]
public class SysUser : BaseEntity<long>
{
    /// <summary>
    /// 角色id
    /// </summary>
    [ForeignKey(nameof(SysRole))]   //"SysRole"
    public int RoleId { get; set; }
    public virtual SysRole? SysRole { get; set; }

    /// <summary>
    /// 用户密码
    /// </summary>
    [Required, StringLength(30)]
    public string UserPwd { get; set; } = null!;
    /// <summary>
    /// 用户名称
    /// </summary>
    [Required, StringLength(50)]
    public string Name { get; set; } = null!;

    /// <summary>
    /// 粉丝数量
    /// </summary>
    public int FansTotal { get; set; }

    /// <summary>
    /// 关注数量
    /// </summary>
    public int FocusTotal { get; set; }

    /// <summary>
    /// 用户头像
    /// </summary>
    [StringLength(200)]
    public string? Avatar { get; set; }

    /// <summary>
    /// 性别
    /// </summary>
    public int Sex { get; set; }

    /// <summary>
    /// 邮箱号
    /// </summary>
    [StringLength(20)]
    public string? Email { get; set; }

    /// <summary>
    /// QQ
    /// </summary>
    [StringLength(10)]
    public string? QQ { get; set; }

    /// <summary>
    /// 微信号
    /// </summary>
    [StringLength(20)]
    public string? WeChatNumber { get; set; }

    /// <summary>
    /// 自我介绍
    /// </summary>
    [StringLength(300)]
    public string? About { get; set; }

}
